import numpy as np
import math 

input_data = np.random.rand(10) * 10

input_data_norm =  np.max(input_data) -  input_data
print(input_data_norm)


rel_softmax = np.empty(input_data_norm.shape)

# 获取ex
rel_exp = np.exp(input_data)
print(rel_exp)

exp_sum = np.sum(rel_exp)
print(exp_sum)

rel_softmax = rel_exp / exp_sum

print("rel sum ", np.sum(rel_softmax))
int_input_data_norm = input_data_norm.astype(np.int32)
print("int_input_data_norm", int_input_data_norm )
int_exp = np.exp(int_input_data_norm)
print("int_exp",int_exp)
int_softmax = 1 / int_exp

print("Rel_softmax: ", rel_softmax)
print("int softmax: ", int_softmax)
print("int sum", np.sum(int_softmax))










